package top.likeyoudo.introduction.inheritance

/**
 *@author LikeYouDo
 *@date 2024/12/10 15:20
 */
open class Lion(val name: String, val origin: String) {
    fun sayHello() {
        println("$name, the lion from $origin")
    }
}

class Asiatic(name: String) : Lion(name=name, origin="India")

fun main() {
    val lion: Lion = Asiatic("Simba")
    lion.sayHello()
}